<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title></title>
  <style>
    #my-tab {
      width: 500px;
      height: 500px;
      border: 1px solid #000;
      margin: 20px auto;
    }
    .tab-wrapper {
      height: 50px;
      border-bottom:1px solid #000;
    }
    .tab-item {
      float: left;
      line-height: 50px;
      text-align: center;
      width: 33.33%;
      cursor: pointer;
    }
    .tab-item:hover {
      text-decoration: underline;
    }
    .tab-item.current {
      background-color: #000;
      color: #fff;
      text-decoration: underline;
    }
    .page-item {
      display: none;
    }
    .page-item.current {
      display: block;
    }
  </style>
</head>
<body>
  <div id="my-tab" data='[
    {
      "tab": "tab1",
      "page": "page1"
    }, {
      "tab": "tab2",
      "page": "page2"
    }, {
      "tab": "tab3",
      "page": "page3"
    }]'></div>
    <script src="./js/utils.js"></script>
  <script src="./js/tpl.js"></script>
  <script src="./js/myTab.js"></script>
  <script>
    new MyTab('#my-tab', tpl, tools);
  </script>
</body>
</html>
